package lab02.test06;

/**
 * Created by 婷婷 on 2017/10/15.
 */
public class Circle {

    //属性：半径、周长和面积属性
    private double radius;
    private double circumference;
    private double area;

    //构造有参函数
    public Circle(double radius) {
        this.radius = radius;
    }

    //求面积的方法
    public double area() {
        area = Math.PI * radius * radius;
        return area;
    }

    //求周长的方法
    public double circumference() {
        circumference = 2 * Math.PI * radius;
        return circumference;
    }
}
